(define (compose f g)
    (lambda (x) 
        (f (g x))
    )
)


(define (repeated m a)
    (if (= a 1)
        (lambda (x) 
            (m x)
        )
        (compose (repeated m (- a 1)) m)
    )    
)

(define (square x)
    (* x x)
)

(display ((repeated square 2) 5))
(exit)